<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title></title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" href="<%=basePath%>css/page.css">
</head>

<script type="text/javascript">
    function clearNoNum(obj)
    {
        obj.value = obj.value.replace(/[^\d.]/g,"");  //清除“数字”和“.”以外的字符
        obj.value = obj.value.replace(/^\./g,"");  //验证第一个字符是数字而不是.
        obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的.
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
    }

</script>
<body>
<div class="jump">

    <c:choose>
        <c:when test="${list.pageNo==1}">
            <div class="btn_ye">首页</div>
        </c:when>
        <c:otherwise>
            <div onclick="gotoPage(1)" class="btn_ye">首页</div>
        </c:otherwise>
    </c:choose>
    <c:choose>
        <c:when test="${list.pageNo==1}">
            <div class="btn_ye">上一页</div>
        </c:when>
        <c:otherwise>
            <div onclick="gotoPage(${list.pageNo-1})" class="btn_ye">上一页</div>
        </c:otherwise>
    </c:choose>
    <c:choose>
        <c:when test="${list.totalPages==list.pageNo}">
            <div class="btn_ye">下一页</div>
        </c:when>
        <c:otherwise>
            <div onclick="gotoPage(${list.pageNo+1})" class="btn_ye">下一页</div>
        </c:otherwise>
    </c:choose>
    <c:choose>
        <c:when test="${list.pageNo==list.totalPages}">
            <div class="btn_ye">尾页</div>
        </c:when>
        <c:otherwise>
            <div onclick="gotoPage(${list.totalPages})" class="btn_ye">尾页</div>
        </c:otherwise>
    </c:choose>

    共<span>&nbsp;${list.totalPages}</span> 页&nbsp;共<span>&nbsp;${list.total}&nbsp;</span>条 &nbsp;
    当前第<span>&nbsp;${list.pageNo}</span> 页
    跳转到
    <input class="case" id="inputPage" style="width: 50px" type="text"
           onkeyup="this.value=this.value.replace(/\D/g,'')"
           onafterpaste="this.value=this.value.replace(/\D/g,'')"
    >页&nbsp;
    <input class="confirm" id="goto" type="button" value="确认" onclick="gotoPage(0)">
    每页显示
    <input class="case" type="text" id="getPageSize" style="width: 30px"
           onkeyup="this.value=this.value.replace(/\D/g,'')"
           onafterpaste="this.value=this.value.replace(/\D/g,'')"
           value="${list.pageSize}">条
    <input id="queren" class="confirm" type="button" onclick="gotoPage(0)" value="确认">
</div>
</body>
</html>
